<template>
	<view class="search flex align-items-center">
		<view class="search flex align-items-center">
			<view class="iconfont fcc mr-20 ">
				&#xe61e;
			</view>
			<input v-model="keyword" placeholder="请搜索手机号/姓名/订单号" class="search-text"
				:placeholderStyle="placeholderStyle" @blur="onSearch" />
		</view>
	</view>
</template>

<script>
	export default {
		name: "p-search",
		data() {
			return {
				keyword: '',
			};
		},
		methods: {
			onSearch() {
				this.$emit('onSearch', this.keyword)
			}
		},
		computed: {
			placeholderStyle() {
				return "fontSize: '28rpx',color: '#999',"
			},
		}
	}
</script>

<style lang="scss" scoped>
	.search {
		width: 100%;
		height: 100%;
		border-radius: 18rpx;
		background-color: #f5f5f5;
		padding: 0 20rpx;

		.iconfont {
			width: 50rpx;
			height: 50rpx;
			font-size: 44rpx;
		}

		.search-text {
			flex: 1;
			font-size: 28rpx;
			color: #333;
		}
	}
</style>